package com.ljtxxhwj.myblob.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;
import java.time.LocalDateTime;

/**
 * Entity representing a like action by a user on an article in the system.
 */
@Data
public class Like {

    private Integer articleId; // 对应文章的ID
    private Integer userId;    // 点赞的用户ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp likeDate; // 点赞的时间
    // 可以根据需要添加getter和setter方法，或者使用lombok的@Data注解自动生成

    private Article article;
    private User user;
}